package org.itzixi.controller;


import jakarta.annotation.Resource;
import org.itzixi.utils.RedisOperator;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/gate")
public class TestController {

    @Resource
    private RedisOperator redis;

    @GetMapping("/test123")
    public String hello(){
        return "hello main service";
    }

    @GetMapping("/setRedis")
    public Object setRedis(String key, String value){
        redis.set(key, value);
        return "SetRedis OK";
    }

    @GetMapping("/getRedis")
    public Object getRedis(String key){
        return "GetRedis OK";
    }
}
